package com.xyy.saas.payment.cores.vo;

import com.xyy.saas.payment.cores.enums.*;

import java.io.Serializable;
import java.util.Arrays;
import java.util.List;

public class ChannelSwitchVO implements Serializable {

    /**
     * 支付平台分配，业务线标识
     */
    private BusinessTypeEnum businessType;

    /**
     * 支付平台分配，产品线标识
     */
    private BusinessOrderTypeEnum businessOrderType;

    /**
     * 业务方用户id
     */
    private List<String> businessIds;

    /**
     * 支付平台分配，用户类型
     */
    private BusinessIdTypeEnum businessIdType;

    /**
     * 支付平台分配，验签
     */
    private InvokerEnum invoker;

    /**
     * 目标通道
     */
    private ChannelTypeEnum toChannel;

    public BusinessTypeEnum getBusinessType() {
        return businessType;
    }

    public void setBusinessType(BusinessTypeEnum businessType) {
        this.businessType = businessType;
    }

    public BusinessOrderTypeEnum getBusinessOrderType() {
        return businessOrderType;
    }

    public void setBusinessOrderType(BusinessOrderTypeEnum businessOrderType) {
        this.businessOrderType = businessOrderType;
    }

    public List<String> getBusinessIds() {
        return businessIds;
    }

    public void setBusinessIds(List<String> businessIds) {
        this.businessIds = businessIds;
    }

    public BusinessIdTypeEnum getBusinessIdType() {
        return businessIdType;
    }

    public void setBusinessIdType(BusinessIdTypeEnum businessIdType) {
        this.businessIdType = businessIdType;
    }

    public InvokerEnum getInvoker() {
        return invoker;
    }

    public void setInvoker(InvokerEnum invoker) {
        this.invoker = invoker;
    }

    public ChannelTypeEnum getToChannel() {
        return toChannel;
    }

    public void setToChannel(ChannelTypeEnum toChannel) {
        this.toChannel = toChannel;
    }

    public static ChannelSwitchVO buildECPOPSwitchFM(List<String> businessIds){
        ChannelSwitchVO channelSwitchVO = new ChannelSwitchVO();
        channelSwitchVO.setBusinessType(BusinessTypeEnum.EC);
        channelSwitchVO.setBusinessIdType(BusinessIdTypeEnum.EC_POP);
        channelSwitchVO.setBusinessOrderType(BusinessOrderTypeEnum.EC_POP);
        channelSwitchVO.setBusinessIds(businessIds);
        channelSwitchVO.setInvoker(InvokerEnum.EC_POP);
        channelSwitchVO.setToChannel(ChannelTypeEnum.FM);
        return channelSwitchVO;
    }
}
